package day06;

import java.util.Arrays;

public class HomeWork {
    public static void main(String[] args) {
        say();
        sayHi("你好");
        sayHello("hello","boy");
        int a=get();
        System.out.println(a);
        int result=plus(88,88);
        System.out.println(result);
        int []p=testArray(6,987456);
        for (int i=0;i<p.length;i++){
            System.out.println(p[i]);
        }
    }
    public static void say(){
        System.out.println("hello");
    }
    public static void sayHi(String s){
        System.out.println(s);
    }
    public static void sayHello(String T,String R){
        System.out.println(T+"\t"+R);
    }
    public static int get(){
        return 888;
    }
    public static int plus(int x,int y){
        int z=x+y;
        return z;
    }

    public static int[] testArray(int x,int y){
        int[]a=new int[x];
        for (int i=0;i< a.length;i++){
            a[i]=(int)(Math.random()*y);
        }
        return a;
    }
}
        /*int []p=new int[5];
        for (int i=0;i< p.length;i++){
            p[i]=(int)(Math.random()*100+1);
            System.out.println(p[i]);
        }
        int max=p[0];
        for (int i=1;i<p.length;i++){
            if (max<p[i]){
                max=p[i];
            }
        }
        System.out.println("最大值为"+max);
        p=Arrays.copyOf(p,p.length+1);
        p[p.length-1]=max;

         */



        /*sayHi(6);
        sayHello(6,8);
        int a=getNum();
        System.out.println(a);
        double w=3.6,q=3.997;
         double er =plus(w,q);
        System.out.println(er);
        int []u=testArray(8,900000);
       for (int i=0;i<u.length;i++){
           System.out.println(u[i]);
       }

         */




        /*int []ufo=new int[7];
        for (int i=0;i< ufo.length;i++){
            ufo[i]=(int)(Math.random()*100);
            System.out.println(ufo[i]);
        }
        int max=ufo[0];
        for (int i=1;i< ufo.length;i++){
            if (max<ufo[i]){
                max=ufo[i];
            }
        }
        System.out.println("最大值为"+max);
        ufo= Arrays.copyOf(ufo,ufo.length);
        ufo[ufo.length-1]=max;

         */







    /*public static void say(){
        System.out.println(1);
    }
    public static void sayHi(int x){
        System.out.println(x);
    }
    public static void sayHello(int num1,int num2){
        int num=num1+num2;
        System.out.println(num);
    }
    public static int getNum(){
        return 999;
    }
    public static double plus(double u,double p){
        double z=u+p;
        return z;
    }
    public static int[] testArray(int x,int y){
        int []a=new int[x];
        for (int i=0;i< a.length;i++){
            a[i]=(int) (Math.random()*y+1);
        }
        return a;
    }

     */

